package designpattern.factory.factorymethod;

//北京披萨工厂
public class BJPizzaFactory extends PizzaFactory{
    @Override
    public Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if("bj cheese".equals(orderType)){
            pizza = new BJCheesePizza();
            pizza.setName("bj cheese");
        }else if("bj greek".equals(orderType)){
            pizza = new BJGreekPizza();
            pizza.setName("bj greek");
        }
        return pizza;
    }
}
